From 547b64a24bd9384fae73c3a28f903dba7239bfd0 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sun, 18 Apr 2010 23:31:12 -0700 Subject: [PATCH] Switch to "3.0 (quilt)" source format and drop protected_files handling. --- debian/changelog | 6 +++- debian/rules | 68 +++++++------------------------------------- debian/source/format | 1 + 3 files changed, 17 insertions(+), 58 deletions(-) create mode 100644 debian/source/format diff --git a/debian/changelog b/debian/changelog index 0e7dcbe1ef0..d3a24ba4295 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,7 +11,11 @@ emacs23 (23.1+1-7) unstable; urgency=low * Update debian/compat from 4 to 7. - -- Rob Browning Sat, 17 Apr 2010 23:38:10 -0700 + * Switch to Debian 3.0 (quilt) source format and drop debian/rules + "protected_files" handling since we don't build in $(CURDIR) and + haven't for a while. + + -- Rob Browning Sun, 18 Apr 2010 23:29:13 -0700 emacs23 (23.1+1-6) unstable; urgency=low diff --git a/debian/rules b/debian/rules index 09b3ed38d16..6f8cd5ae266 100755 --- a/debian/rules +++ b/debian/rules @@ -71,11 +71,6 @@ pf := set -o pipefail # we'll need to be careful. We'll probably have to build completely # separate packages from completely separate source trees. -# Note that we use quilt to handle the debian patches. One of the -# biggest differences between quilt and say dpatch is that you have to -# explicitly "quilt add" a file to a patch before you edit it. See -# "man quilt" for details.. - # If the source tree ever ends up in an untenable "can't go forward, # can't go back" state with respect to patching, you can always start # over by just moving the current debian directory to a newly unpacked @@ -189,15 +184,6 @@ endif target := $(DEB_HOST_GNU_TYPE) movemail_bin := usr/lib/emacs/$(runtime_ver)/$(target)/movemail -# These files may be modified in the *source* tree during the build. -# Wonder if we could patch emacs to copy/use these files to/from the -# build tree... (See Makefile.in's AUTOGENEL definition.) -protected_files := \ - lisp/cus-load.el \ - lisp/finder-inf.el \ - lisp/loaddefs.el \ - lisp/subdirs.el - # Info files that are going to show up in the main dir. main_dir_info_files := \ efaq @@ -292,12 +278,6 @@ define checkdir fi endef -define build_cmd - $(MAKE) -j $(joblimit) -C $(1) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" - # If we don't use bootstrap, we need to explicitly build info. - $(MAKE) -j $(joblimit) -C $(1) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" info -endef - # If we ever need to do the stripping outside of dh_strip, just add an # INSTALL_STRIP="-s" to the make vars below. @@ -307,18 +287,6 @@ define emacs_inst localstatedir=/var endef - - -define patch - $(quilt) push -a -endef - -define unpatch - test -z "$$($(quilt) applied)" || $(quilt) pop -a - rm -f debian/stamp/patch - rm -rf .pc -endef - define cleanup_all # distclean goes first so we clean using patched code rm -f debian/stamp/setup @@ -329,13 +297,8 @@ define cleanup_all -$(MAKE) distclean cd info && rm -f $$(ls | grep -v COPYING | grep -v '^dir$$') dh_clean - $(unpatch) # now clean up bits in the source tree that the above didn't handle find -name "*.elc" | xargs --no-run-if-empty rm - if [ -e debian/protected-files.tgz ]; then \ - tar xzpf debian/protected-files.tgz; \ - fi - rm -f debian/protected-files.tgz # now clean up everything else (mostly ./debian related stuff) find -name '*~' | xargs --no-run-if-empty rm -f rm -f debian/substvars @@ -350,7 +313,6 @@ define cleanup_all debian/files* rm -rf debian/*.tmp rm -rf $(deb_trash) - rm -rf .pc test ! -e debian/stamp || rmdir debian/stamp endef @@ -391,15 +353,10 @@ check-vars: define check_diff - lsdiff -z \ - -x $(src_name)-$(debsrc_ver)/debian/'*' \ - ../$(src_name)_$(debian_ver).diff.gz \ - > debian/tmp-src-lsdiff - @if test -s debian/tmp-src-lsdiff; \ + @if quilt series | grep -e '^debian-changes-'; \ then \ - echo "Diffs found outside ./debian in" \ - " ../$(src_name)_$(debsrc_ver).diff.gz"; \ - cat debian/tmp-src-lsdiff; \ + echo "Diffs found outside ./debian:"; \ + ls debian/patches/debian-changes-*; \ false; \ else \ echo "../$(src_name)_$(debsrc_ver).diff.gz looks OK."; \ @@ -509,16 +466,7 @@ deb_trash += debian/emacsVER-common.README.tmp deb_trash += debian/emacsVER-common.README.00 deb_trash += debian/emacsVER-common.README.01 -debian/protected-files.tgz: - tar czpSf debian/protected-files.tgz.tmp $(protected_files) - mv debian/protected-files.tgz.tmp $@ - -debian/stamp/patch: debian/protected-files.tgz - $(checkdir) - $(patch) - mkdir -p $(dir $@) && touch $@ - -debian/stamp/setup: debian/stamp/patch +debian/stamp/setup: $(checkdir) dh_autotools-dev_updateconfig aclocal @@ -559,7 +507,13 @@ define cfg_tree rm -rf $(1) mkdir $(1) cp -a $$(ls -A | grep -v '^debian$$' | grep -v '^.pc$$') "$(1)" - cd $(1) && CFLAGS="$(CFLAGS)" ../../configure $(confflags) $(2) + cd $(1) && CFLAGS="$(CFLAGS)" ./configure $(confflags) $(2) +endef + +define build_cmd + $(MAKE) -C $(1) -j $(joblimit) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" + # If we don't use bootstrap, we need to explicitly build info. + $(MAKE) -C $(1) -j $(joblimit) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" info endef # For those who prefer the old-style non-toolkit scrollbars, just add diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000000..163aaf8d82b --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) -- 2.30.2